<?php

$self = 'index_search.php';

/* 简洁版首页 */
@ require ('writable/set/set.php');
if (!isset($sql)) {
  @ require ('writable/set/set_sql.php');
}
if (!isset($web['html'])) {
  @ require ('writable/set/set_html.php');
}
if (!function_exists('cutstr')) {
  require ('readonly/function/cutstr.php');
}

function get_i($v, $li, $_li) {
  global $web;
  $text = '';
  if ($web['link_type_i'] == 1) {
    //$link = '"export.php?url=".urlencode($h[0]).""';
    $link = '"".($h[3] == "js" ? $h[0] : "export.php?url=".urlencode($h[0])).""';
  } else {
    $link = '"".($h[3] == "js" ? "export.php?url=".urlencode($h[0]) : $h[0]).""';
  }
  if ($v = trim($v)) {
    foreach (@explode("\n", $v) as $each) {
      $h = @explode("|", trim($each));
      $text .= ''.$li.'<a href="'.eval('return '.$link.';').'"'.($h[2] != '' ? ' class="'.$h[2].'"' : '').''.($h[4] != '' && $web['d_type'] != 1 ? ' title="'.cutstr(preg_replace('/<br[^>]*>/i', '
', $h[4]), 400).'" onmouseover="sSD(this,event);"' : '').'>'.$h[1].'</a>'.$_li.'';
    }
  }
  return $text;
}

$err = '';
$text_mingz = $text_mingz_ad = $text_column = $text_tool = $text_friedlink = '';

if (!isset($sql['db_err'])) {
  $db = db_conn();
}
if ($sql['db_err'] == '') {
  if ($result = db_query($db, 'SELECT * FROM `'.$sql['pref'].''.$sql['data']['承载网址数据的表名'].'` WHERE column_id="homepage" AND class_id="0" ORDER BY id')) {
    if ($row = db_fetch($db, $result)) {
	  $text_mingz = $row['class_priority'] ? $row['class_priority'] : get_i($row['http_name_style'], '', ' ');
      unset($row);
    }
    $result = NULL;
  }
} else {
  die($sql['db_err']);
}

db_close($db);


?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>集成搜索 - <?php echo $web['sitename2']; ?></title>
<meta name="keywords" content="<?php echo $web['keywords']; ?>">
<meta name="description" content="<?php echo $web['description']; ?>">
<base target="_blank" />
<link href="writable/css/style.css" rel="stylesheet" type="text/css">
<link href="writable/css/<?php echo $web['cssfile']; ?>/style.css" rel="stylesheet" type="text/css" id="my_style">
<script type="text/javascript" language="javascript" src="readonly/js/main.js"></script>
<?php
if (file_exists('writable/js/goiphone.js')) {
  echo '<script type="text/javascript" language="javascript" src="writable/js/goiphone.js"></script>';
}
?>
<style type="text/css">
<!--
.body { width:900px; margin-left:auto; margin-right:auto; }
.body a { margin-left:6px; margin-right:6px; white-space:nowrap; overflow:hidden; }
#head_out { margin-top:50px; border-bottom:none; }
#head { width:900px; }
.body img { vertical-align:text-bottom; }

#search { position: inherit; }
.forQQ1 { margin-bottom:0; float: none; }
.forQQ_1 { height: auto; width:100%; position: inherit; top: auto; right: auto; clear:both; text-align:center; }

-->
</style>
  </head>

<body>
<style type="text/css">
<!--
#logo { float:none; clear:both; text-align:center; margin-bottom:30px; }
#search { float: none; text-align:center; width:auto; }
#search_body { margin:auto; }

-->
</style>
<?php @ include ('readonly/require/head.php'); ?>
<script type="text/javascript" language="JavaScript">
<!--
$('kw').focus();
function addFocus() {
  $('kw').focus();
};
if (document.all) {
  window.attachEvent('onload', addFocus);
} else {
  window.addEventListener('load', addFocus, false);
};
-->
</script>
<script type="text/javascript" language="JavaScript">
<!--
if(document.getElementById('date_time')!=null){document.getElementById('date_time').innerHTML='<a href="detail.php?column_id=1&class_id=15&detail_title=%E4%B8%87%E5%B9%B4%E5%8E%86" title="农历 '+solarDay2()+'">'+YYMMDD()+' '+weekday()+' '+dateBox+'</a>'}
-->
</script>
<br />
<div class="body">
    <script> document.write(myCollection); </script><?php echo !empty($text_mingz) ? $text_mingz : $err; ?>
</div>
<br />
<br />
<br />
<?php @ include ('writable/require/foot.php'); ?>
<?php @ include ('writable/require/statistics.txt'); ?>
</body>
<iframe src="PseudoXMLHTTP.php?xml_id=weather&xml_file=readonly%2Fweather%2Fgetweather.php&char=utf-8" style="display:none;"></iframe>
<iframe src="PseudoXMLHTTP.php?xml_id=collection&xml_file=readonly%2Frun%2Fpost_member_collection_show.php" style="display:none;"></iframe>

<script type="text/javascript" language="javascript" src="readonly/js/opensug.js"></script>
<?php
if ($web['link_type_i'] == 0) {
  @ include ('readonly/require/juejinlian.html');
}
?>
</html>
